import request from "@/utils/request";
import pathname from "./pathname";

export function getAnnualReportList(data) {
  return request({
    url: pathname.getAnnualReportList,
    method: "post",
    data,
    _hasLoading: false
  });
}
export function getAddReportDetail(id) {
  return request({
    url: pathname.getAddReportDetail.replace(/{id}/g, id),
    method: "get",
    _hasLoading: true
  });
}
export function getAnnualReportTime(id) {
  return request({
    url: pathname.getAnnualReportTime,
    method: "get",
    _hasLoading: true
  });
}
export function checkYearReport(id) {
  return request({
    url: pathname.checkYearReport.replace(/{id}/g, id),
    method: "get",
    _hasLoading: true
  });
}
export function saveAnnualReport(data) {
  return request({
    url: pathname.saveAnnualReport,
    method: "post",
    data,
    _hasLoading: true
  });
}
export function deleteAnnualReport(id) {
  return request({
    url: pathname.deleteAnnualReport.replace(/{id}/g, id),
    method: "DELETE",
    _hasLoading: true
  });
}
